/**
 * 请求所有的用户信息: get/users
 * get/users/:id
 * post/users body {username: password}
 * delete/users/:id
 * patch/users/:id {nickname:}
 */

const express = require('express')

const router = express.Router();

router.get('/', (req, res, next) => {
    res.json(['why', 'leon'])
})

router.get('/:id', (req, res, next) => {
    res.json(`${req.params.id}用户的信息`)
})

router.post('/', (req, res, next) => {
    res.json('create user success')
})







module.exports = router;